Add File
Add files or websites from URLs to Hyperspell for connecting AI applications to unstructured and semi-structured data.
Instructions
Add a file or website from a URL to Hyperspell.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/hyperspell_mcp/server.py:132-134 (registration)Registration of the 'Add File' tool using the @mcp.tool decorator.@mcp.tool( name="Add File", description="Add a file or website from a URL to Hyperspell." )
- src/hyperspell_mcp/server.py:135-139 (handler)The handler function that executes the tool logic by adding the URL to Hyperspell via the API.def add_file(url: str) -> DocumentStatus: """Add a file or URL to Hyperspell.""" r = mcp.api.documents.add_url(url=url, collection=mcp.config.collection) return DocumentStatus.from_pydantic(r)
- src/hyperspell_mcp/types.py:46-50 (schema)Dataclass defining the output schema (DocumentStatus) returned by the tool.class DocumentStatus(BaseModel): id: int status: str collection: str